<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html><head><title>Programming in Lua : p1.4</title>
<link rel="stylesheet" type="text/css" href="pil.css">
</head>
<body>
<p class="warning">
<A HREF="contents.html"><IMG TITLE="Programming in Lua (first edition)" SRC="capa.jpg" ALT="" ALIGN="left"></A>This first edition was written for Lua 5.0. While still largely relevant for later versions, there are some differences.<BR>The third edition targets Lua 5.2 and is available at <A HREF="http://www.amazon.com/exec/obidos/ASIN/859037985X/theprogrammil3-20">Amazon</A> and other bookstores.<BR>By buying the book, you also help to <A HREF="../donations.html">support the Lua project</A>.
</p>
<table width="100%" class="nav">
<tr>
<td width="10%" align="left"><a href="p1.3.html"><img border="0" src="left.png" alt="Previous"></a></td>
<td width="80%" align="center"><a href="index.html"><font face="Helvetica,Arial,sanserif">
<font color="gray">Programming in </font><font color="blue"> Lua</font>
</font></a></td>
<td width="10%" align="right"><a href="p1.5.html"><img border="0" src="right.png" alt="Next"></a></td>
</tr>
<tr>
<td width="10%" align="left"></td>
<td width="80%" align="center"><a href="index.html#0">Preface</a></td>
<td width="10%" align="right"></td></tr>
</table>
<hr/>
<p><h3>About the Book</h3>

<p>

<p>I started writing this book in the winter of 1998.
(Here, in the southern hemisphere, that means the middle of the year.
And "winter" is more like a mild autumn.)
At that time, Lua was still in version 3.1.
Since then, Lua went through two big changes,
first to version 4.0, in 2000,
then to version 5.0, in 2003.

<p>It is quite obvious that those changes had a big impact on the book.
Some parts lost their raison d'&ecirc;tre,
such as the detailed explanation around the complexity of upvalues.
Whole chapters were rewritten, such as those about the C API,
and whole chapters were created, such as the one about coroutines.

<p>What is not obvious, however, is the big impact that
the writing of this book had on the evolution of Lua.
Not by chance, some of the biggest changes in the language
were in areas not yet covered by the book at the time of the change.
As I worked through the book, sometimes I suddenly got stuck in a chapter.
I could not figure out how to start or even how to motivate it.
It is when you try to explain how to use something that
you better feel how easy it is to use it (or not).
So, those difficulties were strong hints that some things in Lua
needed improvement.
Other times I succeeded in writing a chapter,
only to discover, later,
that nobody could understand or agree with what I wrote.
Frequently it was my fault (as I writer),
but occasionally we spotted another corner of the language
that deserved some improvement.
(For instance, the transition from upvalues to lexical scoping
was triggered by complaints over a feeble attempt,
in an earlier draft of this book,
to describe upvalues as a kind of lexical scoping.)

<p>The changes of the language deferred the completion of this book;
now the completion of this book will probably defer significant
changes in the language.
There are at least two reasons for that:
First, Lua 5.0 is cleaner and more mature than earlier versions
of the language (partially thanks to the book).
Second, the book adds weight to the culture around the language
and therefore increases its inertia.
This cultural-weight increase is the first of my main goals with this book.
My second main goal is to increase even more the spread of Lua.

<hr/>
<table width="100%" class="nav">
<tr valign="top">
<td width="90%" align="left">
<small>
  Copyright &copy; 2003&ndash;2004 Roberto Ierusalimschy.  All rights reserved.
</small>
</td>
<td width="10%" align="right"><a href="p1.5.html"><img border="0" src="right.png" alt="Next"></a></td>
</tr>
</table>


</body></html>

